<!--
*Author：富行天下团队

 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/partyProducts.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/mall/partyProducts.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'id',
                    footer: "Foots",
                    cnName: '渔阳产品同步',
                    name: 'partyProducts',
                    url: "/partyProducts/",
                    sortName: "id"
                },
                extend: extend,
                editFormFields: {
                  partyProductsId: '',
                  partyProductsCode: '',
                  partyProductsName: '',
                  appointment_time: [],
                  starting_nine: '',
                  starting_ten: '',
                  starting_thirteen: '',
                  starting_eighteen: '',
                  same_day: ''
                },
                editFormOptions: [
                [{"title":"第三方产品id","field":"partyProductsId","type":"text",disabled:true},
                {"title":"第三方产品名称","field":"partyProductsName","type":"text",disabled:true}],
                [{"title":"预约课程名称","field":"partyProductsCode","type":"select",dataKey:'YYProduct',data:[],required: true},{
                  dataKey: "enable",
                  data: [],
                  title: "是否可预约当天",
                  field: "same_day",
                  colSize: 3,
                  type: "switch",
                },],
                [
                {"title":"预约时间","field":"appointment_time","type":"checkbox",dataKey:'YYTime',data:[],colSize: 12},
                ],
                [
                {"title":"9:00-10:00","field":"starting_nine","type":"number",hidden: true },
                {"title":"10:20-11:20","field":"starting_ten","type":"number",hidden: true},
                ],
                [
                {"title":"13:00-14:00","field":"starting_thirteen","type":"number",hidden: true},
                {"title":"18:00-19:00","field":"starting_eighteen","type":"number",hidden: true},
                ],
                ],
                searchFormFields: {"partyProductsId":"","partyProductsCode":"","partyProductsName":""},
                searchFormOptions: [[{"title":"第三方产品id","field":"partyProductsId","type":"text"},{"title":"预约课程名称","field":"partyProductsCode","type":"select",dataKey:'YYProduct'},{"title":"第三方产品名称","field":"partyProductsName","type":"text"}]],
                columns: [{field:'id',title:'第三方产品表',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'partyProductsId',title:'第三方产品id',type:'string',width:220,align:'left',sortable:true},
                       {field:'partyProductsCode',title:'预约课程名称',type:'string',width:220,align:'left',bind:{key:'YYProduct',data:[]}},
                       {field:'partyProductsName',title:'第三方产品名称',type:'string',width:220,align:'left'}],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
